home *** CD-ROM | disk | FTP | other *** search
/ Chip: Internet / Chip Internet.iso / viewer / sox7dos / sox.doc < prev    next >
Text File  |  1993-02-17  |  13KB  |  400 lines

  1.  
  2.  
  3.  
  4.      SOX(1)                UNIX System V                  SOX(1)
  5.  
  6.  
  7.  
  8.      NAME
  9.       sox -    SOund eXchange - universal sound sample    translator
  10.  
  11.      SYNOPSIS
  12.           sox infile outfile
  13.           sox infile outfile [ effect [ effect options ... ] ]
  14.           sox infile -e effect [ effect options ... ]
  15.           sox [ general options ] [ format options ] ifile
  16.               [ format options ] ofile [ effect [ effect options ... ] ]
  17.  
  18.           General options: [ -V ] [ -v volume ]
  19.  
  20.           Format options: [ -t filetype ] [ -r rate ] [ -s/-u/-U/-A ]
  21.                           [ -b/-w/-l/-f/-d/-D ] [ -c channels ] [ -x ]
  22.           Effects:
  23.                copy
  24.                rate
  25.                avg
  26.                stat
  27.                echo delay volume [ delay volume ... ]
  28.                vibro speed [ depth ]
  29.                lowp center
  30.                band [ -n ] center [ width ]
  31.  
  32.      DESCRIPTION
  33.           Sox translates sound files from one format to another,
  34.       possibly doing a sound effect.
  35.  
  36.      OPTIONS
  37.       The option syntax is a little    grotty,    but in essence:
  38.            sox file.au file.voc
  39.       translates a sound sample in SUN Sparc .AU format into a
  40.       SoundBlaster .VOC file, while
  41.            sox -v 0.5 file.au -rate    12000 file.voc rate
  42.       does the same    format translation but also lowers the
  43.       amplitude by 1/2 and changes the sampling rate from 8000
  44.           hertz to 12000 hertz via the rate sound effect loop.
  45.  
  46.       File type options:
  47.  
  48.           -t filetype
  49.             gives the type of the sound    sample file.
  50.  
  51.           -r rate   Give sample     rate in Hertz of file.
  52.  
  53.           -s/-u/-U/-A
  54.             The    sample data is signed linear (2's complement),
  55.             unsigned linear, U-law (logarithmic), or A-law
  56.             (logarithmic).  U-law and A-law are    the U.S. and
  57.             international standards for    logarithmic telephone
  58.             sound compression.
  59.  
  60.           -b/-w/-l/-f/-d/-D
  61.             The    sample data is in bytes, 16-bit    words, 32-bit
  62.  
  63.  
  64.  
  65.      Page 1                          (printed 2/3/93)
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.      SOX(1)                UNIX System V                  SOX(1)
  73.  
  74.  
  75.  
  76.             longwords, 32-bit floats, 64-bit double floats, or
  77.             80-bit IEEE    floats.     Floats    and double floats are
  78.             in native machine format.
  79.  
  80.           -x            The sample data is in XINU format; that is, it
  81.             comes from a machine with the opposite word    order
  82.             than yours and must    be swapped according to    the
  83.             word-size given above.  Only 16-bit    and 32-bit
  84.             integer data may be    swapped.  Machine-format
  85.             floating-point data    is not portable.  IEEE floats
  86.             are    a fixed, portable format. ???
  87.  
  88.           -c channels
  89.             The    number of sound    channels in the    data file.
  90.             This may be    1, 2, or 4; for    mono, stereo, or quad
  91.             sound data.
  92.  
  93.       General options:
  94.  
  95.           -e            after the input file allows you to avoid giving an
  96.             output file    and just name an effect.  This is only
  97.                     useful with the stat effect.
  98.  
  99.           -v volume Change amplitude (floating point); less than 1.0
  100.             decreases, greater than 1.0    increases.  Note: we
  101.             perceive volume logarithmically, not linearly.
  102.                     Note: see the stat effect.
  103.  
  104.           -V            Print a description of processing phases.  Useful
  105.                     for figuring out exactly how sox is   mangling your
  106.             sound samples.
  107.  
  108.       The input and    output files may be standard input and output.
  109.           This is specified by '-'.  The -t type option     must be given
  110.           in this case, else sox will not know the format of the given
  111.           file.  The -t, -r, -s/-u/-U/-A, -b/-w/-l/-f/-d/-D and       -x
  112.       options refer    to the input data when given before the    input
  113.       file name.  After, they refer    to the output data.
  114.  
  115.           If you don't give an output file name, sox will just read
  116.       the input file.  This    is useful for validating structured
  117.           file formats; the stat effect may also be used via the -e
  118.       option.
  119.  
  120.      FILE TYPES
  121.           Sox needs to know the   formats of the input and output files.
  122.       File formats which have headers are checked, if that header
  123.       doesn't seem right, the program exits    with an    appropriate
  124.       message.  Currently, the raw (no header), IRCAM Sound    Files,
  125.       Sound    Blaster, SPARC .AU (w/header), Mac HCOM, PC/DOS    .SOU,
  126.       Sndtool, and Sounder,    NeXT .SND, Windows 3.1 RIFF/WAV,
  127.       Turtle Beach .SMP, and Apple/SGI AIFF    and 8SVX formats are
  128.  
  129.  
  130.  
  131.      Page 2                          (printed 2/3/93)
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.      SOX(1)                UNIX System V                  SOX(1)
  139.  
  140.  
  141.  
  142.       supported.
  143.  
  144.           .aiff     AIFF files used on Apple IIc/IIgs and SGI.  Note:
  145.             the    AIFF format supports only one SSND chunk.  It
  146.             does not support multiple sound chunks, or the
  147.             8SVX musical instrument description    format.     AIFF
  148.             files are multimedia archives and and can have
  149.             multiple audio and picture chunks.    You may    need a
  150.             separate archiver to work with them.
  151.  
  152.           .au       SUN Microsystems AU files.  There are apparently
  153.             many types of .au files; DEC has invented its own
  154.             with a different magic number and word order. The
  155.             .au    handler    can read these files but will not
  156.             write them.     Some .au files    have valid AU headers
  157.             and    some do    not.  The latter are probably original
  158.             SUN    u-law 8000 hz samples.    These can be dealt
  159.                     with using the .ul format (see below).
  160.  
  161.           .hcom     Macintosh HCOM files.  These are (apparently) Mac
  162.             FSSD files with some variant of Huffman
  163.             compression.  The Macintosh    has wacky file formats
  164.             and    this format handler apparently doesn't handle
  165.             all    the ones it should.  Mac users will need your
  166.             usual arsenal of file converters to    deal with an
  167.             HCOM file under Unix or DOS.
  168.  
  169.           .raw      Raw files (no header).
  170.             The    sample rate, size (byte, word, etc), and style
  171.             (signed, unsigned, etc.)  of the sample file must
  172.             be given.  The number of channels defaults to 1.
  173.  
  174.           .ub, .sb, .uw, .sw, .ul
  175.             These are several suffices which serve as a
  176.             shorthand for raw files with a given size and
  177.                     style.  Thus, ub, sb, uw, sw, and ul correspond to
  178.             "unsigned byte", "signed byte", "unsigned word",
  179.             "signed word", and "ulaw" (byte).  The sample rate
  180.             defaults to    8000 hz    if not explicitly set, and the
  181.             number of channels (as always) defaults to 1.
  182.             There are lots of Sparc samples floating around in
  183.             u-law format with no header    and fixed at a sample
  184.             rate of 8000 hz.  (Certain sound management
  185.             software cheerfully    ignores    the headers.)
  186.             Similarly, most Mac    sound files are    in unsigned
  187.             byte format    with a sample rate of 11025 or 22050
  188.             hz.
  189.  
  190.           .sf       IRCAM Sound Files.
  191.             SoundFiles are used    by academic music software
  192.             such as the    CSound package,    and the    MixView    sound
  193.             sample editor.
  194.  
  195.  
  196.  
  197.      Page 3                          (printed 2/3/93)
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.      SOX(1)                UNIX System V                  SOX(1)
  205.  
  206.  
  207.  
  208.           .voc      Sound Blaster VOC files.
  209.             VOC    files are multi-part and contain silence
  210.             parts, looping, and    different sample rates for
  211.             different chunks.  On input, the silence parts are
  212.             filled out,    loops are rejected, and    sample data
  213.             with a new sample rate is rejected.     Silence with
  214.             a different    sample rate is generated
  215.             appropriately.  On output, silence is not
  216.             detected, nor are impossible sample    rates.
  217.  
  218.           .auto     This is a ``meta-type'': specifying this type for
  219.             an input file triggers some    code that tries    to
  220.             guess the real type    by looking for magic words in
  221.             the    header.     If the    type can't be guessed, the
  222.             program exits with an error    message.  The input
  223.             must be a plain file, not a    pipe.  This type can't
  224.             be used for    output files.
  225.  
  226.           .smp      Turtle Beach SampleVision files.
  227.             SMP    files are for use with the PC-DOS package
  228.             SampleVision by Turtle Beach Softworks. This
  229.             package is for communication to several MIDI
  230.             samplers. All sample rates are supported by    the
  231.             package, although not all are supported by the
  232.             samplers themselves. Currently loop    points are
  233.             ignored.
  234.  
  235.           .wav      Windows 3.1 .WAV RIFF files.
  236.             These appear to be very similar to IFF files, but
  237.             not    the same. They are the native sound file
  238.             format of Windows 3.1.  Obviously, Windows 3.1 is
  239.             of such incredible importance to the computer
  240.             industry that it just had to have its own sound
  241.             file format.
  242.  
  243.      EFFECTS
  244.       Only one effect from the palette may be applied to a sound
  245.           sample.  To do multiple effects you'll need to run sox in a
  246.       pipeline.
  247.  
  248.       copy                Copy the input file to the
  249.                     output file.  This is the
  250.                     default    effect if both files
  251.                     have the same sampling rate,
  252.                     or the rates are "close".
  253.  
  254.       rate                Translate input    sampling rate
  255.                     to output sampling rate    via
  256.                     linear interpolation to    the
  257.                     Least Common Multiple of the
  258.                     two sampling rates.  This is
  259.                     the default effect if the two
  260.  
  261.  
  262.  
  263.      Page 4                          (printed 2/3/93)
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.      SOX(1)                UNIX System V                  SOX(1)
  271.  
  272.  
  273.  
  274.                     files have different sampling
  275.                     rates.    This is    fast but
  276.                     noisy.
  277.  
  278.       avg                Mix 4- or 2-channel sound file
  279.                     into 2-    or 1-channel file by
  280.                     averaging the samples for
  281.                     different speakers.
  282.  
  283.       stat                Do a statistical check on the
  284.                     input file, and    print results
  285.                     on the standard    error file.
  286.                                         stat may copy the file
  287.                     untouched from input to
  288.                     output,    if you select an
  289.                     output file. The "Volume
  290.                     Adjustment:" field in the
  291.                     statistics gives you the
  292.                                         argument to the -v number
  293.                     which will make    the sample as
  294.                     loud as    possible.
  295.  
  296.           echo [ delay volume ... ]     Add echoing to a sound sample.
  297.                     Each delay/volume pair gives
  298.                     the delay in seconds and the
  299.                     volume (relative to 1.0) of
  300.                     that echo.  If the volumes add
  301.                     up to more than    1.0, the sound
  302.                     will melt down instead of
  303.                     fading away.
  304.  
  305.           vibro speed  [ depth ]        Add the world-famous Fender
  306.                     Vibro-Champ sound effect to a
  307.                     sound sample by    using a    sine
  308.                     wave as    the volume knob.
  309.                                         Speed gives the   Hertz value of
  310.                     the wave.  This    must be    under
  311.                                         30.  Depth gives the amount
  312.                     the volume is cut into by the
  313.                     sine wave, ranging 0.0 to 1.0
  314.                     and defaulting to 0.5.
  315.  
  316.           lowp center                   Apply a low-pass filter.  The
  317.                     frequency response drops
  318.                                         logarithmically with center
  319.                     frequency in the middle    of the
  320.                     drop.  The slope of the    filter
  321.                     is quite gentle.
  322.  
  323.           band [ -n ] center [ width ]  Apply a band-pass filter.  The
  324.                     frequency response drops
  325.                     logarithmically    around the
  326.  
  327.  
  328.  
  329.      Page 5                          (printed 2/3/93)
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.      SOX(1)                UNIX System V                  SOX(1)
  337.  
  338.  
  339.  
  340.                                         center frequency.  The width
  341.                     gives the slope    of the drop.
  342.                                         The frequencies at center +
  343.                                         width and center - width will
  344.                     be half    of their original
  345.                                         amplitudes.  Band defaults to
  346.                     a mode oriented    to pitched
  347.                     signals, i.e. voice, singing,
  348.                                         or instrumental music.  The -n
  349.                     (for noise) option uses    the
  350.                     alternate mode for un-pitched
  351.                                         signals.  Band introduces
  352.                     noise in the shape of the
  353.                     filter,    i.e. peaking at    the
  354.                                         center frequency and settling
  355.                     around it.
  356.  
  357.           Sox enforces certain effects.    If the two files have
  358.       different sampling rates, the    requested effect must be one
  359.           of copy, or rate, If the two files have different numbers of
  360.           channels, the avg effect must be requested.
  361.  
  362.      BUGS
  363.       The syntax is    horrific.  It's    very tempting to include a
  364.       default system that allows an    effect name as the program
  365.       name and just    pipes a    sound sample from standard input to
  366.       standard output, but the problem of inputting    the sample
  367.       rates    makes this unworkable.
  368.  
  369.      FILES
  370.      SEE ALSO
  371.      NOTICES
  372.       The echoplex effect is:
  373.           Copyright    (C) 1989 by Jef    Poskanzer.
  374.           Permission to use, copy, modify, and distribute this
  375.       software and its
  376.           documentation for    any purpose and    without    fee is hereby
  377.       granted, provided
  378.           that the above copyright notice appear in    all copies and
  379.       that both that
  380.           copyright    notice and this    permission notice appear in
  381.       supporting
  382.           documentation.  This software is provided    "as is"
  383.       without express or
  384.           implied warranty.
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.      Page 6                          (printed 2/3/93)
  396.  
  397.  
  398.  
  399. 
  400.